Skip to content

Implement basic categorization for libraries in dartdoc #1641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 26, 2018

Conversation

jcollins-g
Copy link
Contributor

@jcollins-g jcollins-g commented Mar 22, 2018

Fixes #1610.

Also, this is the beginning of a longer chain to implement #1353.

This allows you to mark libraries with {@category Foo} and have libraries appear in a category in the sidebar and in the main package view. Uncategorized libraries appear at the top. An example:

https://user-images.githubusercontent.com/14116827/37685847-3f34c478-2c52-11e8-82b9-6b1485a5a05d.png

This PR also eliminates the "use-categories" flag. The "old style" meaning of categories meaning packages is now gone. The flag is now ignored and Dartdoc decides whether to organize libraries into packages based on whether there are multiple packages in the requested set of libraries.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label Mar 22, 2018
@jcollins-g
Copy link
Contributor Author

jcollins-g commented Mar 22, 2018

This PR also has some implications for #739 and #1454 -- strengthening the Package class and driving more through it will eventually enable those, and dartdoc_options.yaml will likely be needed for both, too.

@devoncarew devoncarew requested review from kevmoo and scheglov March 23, 2018 14:53
Copy link
Member

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add some usage instructions to the README?

generates docs.

```yaml
dartdoc:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have a dartdoc top key in dartdoc_options.yaml?

Couldn't categoryOrder just be at the top?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was paralleling with analysis_options.yaml, which has analyzer and linter subsections. There might be an opportunity for sections for other tools using dartdoc libraries, such as the still vaporware API comparison gadget.

README.md Outdated
@@ -114,6 +142,9 @@ and then you can insert it via `{@macro template_name}`, like
/// More comments
```


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra whitespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor Author

@jcollins-g jcollins-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document my new feature? In our moment of triumph?

README.md Outdated
@@ -114,6 +142,9 @@ and then you can insert it via `{@macro template_name}`, like
/// More comments
```


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

generates docs.

```yaml
dartdoc:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was paralleling with analysis_options.yaml, which has analyzer and linter subsections. There might be an opportunity for sections for other tools using dartdoc libraries, such as the still vaporware API comparison gadget.

@kevmoo
Copy link
Member

kevmoo commented Mar 23, 2018 via email

@jcollins-g jcollins-g merged commit 628acf6 into master Mar 26, 2018
@jcollins-g jcollins-g deleted the dartdoc-categories branch March 26, 2018 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants